JavaScript
{dialog.object}setListTemplateAndPopulate Method
Syntax
{dialog.object}.setListTemplateAndPopulate(listName, data, template);
Arguments
- listName
The ID of the List Control.
- data
A JSON object defining the data used to populate the List.
- templatestring
The template for the List. The template can use client-side template syntax.
Description
Dynamically sets the template for a freeform List control and populates the List with data.
Discussion
This method is a special form of the more general {dialog.object}.setListColumnsAndPopulate.
Example
var data = [ { "Firstname": "Kathy", "Lastname": "Morton", "City": "New York", "State": "NY" } ]; var template = '{Firstname} {Lastname}<br><b>{City}</b>'; {dialog.object}.setListTemplateAndPopulate('list',data,template)
See Also